<template>
  <div class="table-page-search-wrapper">
    <a-form layout="inline">
      <a-row :gutter="48">
        <a-col :md="8" :sm="24">
          <a-form-item>
            <a-input allowClear placeholder="请输入搜索的关键字" v-model="queryParam" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12">
          <span class="table-page-search-submitButtons">
            <a-button type="primary" icon="search" @click="$emit('tableQuery', queryParam)">查询</a-button>
            <a-button style="margin-left: 8px" icon="redo" @click="queryParam = ''">重置</a-button>
          </span>
        </a-col>
        <a-col :md="8" :sm="12">
          <span class="table-page-search-submitButtons" style="text-align: right">
            <a-button type="primary" icon="plus" style="margin-left: 8px" @click="$emit('add')">新增</a-button>
          </span>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>

<script>
export default {
  name: 'CommonHeader',
  data() {
    return {
      queryParam: ''
    }
  }
}
</script>
